<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\api\controller;

/**
 * MDC接口控制器
 */
class Money extends ApiBase
{
	/**
     * 转让记录
     */
    public function zrMoneylist()
    {        	
        return $this->apiReturn($this->logicMoney->zrMoneylist($this->param));
    }
	/**
     * 竞猜规则
     */
    public function cjConfig()
    {    
		$img=db('ad')->where('id',10)->value('cover_id');
		$img_url=get_picture_url($img);
        return $this->apiReturn($img_url);
    }
	/**
     * 竞猜下单列表
     */
    public function cjOrderList()
    {        	
        return $this->apiReturn($this->logicMoney->cjOrderList($this->param));
    }
	/**
     * 竞猜下单
     */
    public function cjOrder()
    {        	
        return $this->apiReturn($this->logicMoney->cjOrder($this->param));
    }
	/**
     * MDC兑换
     */
    public function udcChange()
    {        	
        return $this->apiReturn($this->logicMoney->udcChange($this->param));
    }
	/**
     * 幸运竞猜
     */
    public function cjInfo()
    {   
		$info=db('cj')->where('stat',0)->find();
        return $this->apiReturn($info);
    }
	/**
     * 批量转让MDC
     */
    public function zrMoneys()
    {        	
        return $this->apiReturn($this->logicMoney->zrMoneys($this->param));
    }
	/**
     * 锁定
     */
    public function opUdc()
    {        	
        return $this->apiReturn($this->logicMoney->opUdc($this->param));
    }
	/**
     * 批量购买
     */
    public function buyMoneys()
    {        	
        return $this->apiReturn($this->logicMoney->buyMoneys($this->param));
    }
	/**
     * 批量购买配置
     */
    public function buyConfigs()
    {        	
        return $this->apiReturn(parse_config_array('udc_zk'));
    }
    /**
     * 获得的MDC
     */
    public function moneyList()
    {        	
        return $this->apiReturn($this->logicMoney->getMoneyList($this->param));
    }
	/**
     * 挂卖MDC
     */
    public function sellMoney()
    {        	
        return $this->apiReturn($this->logicMoney->sellMoney($this->param));
    }
	/**
     * 批量撤销挂卖MDC
     */
    public function revokeMoneys()
    {        	
        return $this->apiReturn($this->logicMoney->revokeMoneys($this->param));
    }
	/**
     * 撤销挂卖MDC
     */
    public function revokeMoney()
    {        	
        return $this->apiReturn($this->logicMoney->revokeMoney($this->param));
    }
	/**
     * 挂卖MDC
     */
    public function sellMoneyLog()
    {        	
        return $this->apiReturn($this->logicMoney->sellMoneyLog($this->param));
    }
	/**
     * 转让MDC
     */
    public function zrMoney()
    {        	
        return $this->apiReturn($this->logicMoney->zrMoney($this->param));
    }
	/**
     * MDC配置信息
     */
    public function mdcConfig()
    {        	
        return $this->apiReturn($this->logicMoney->mdcConfig());
    }
	/**
     * 购买
     */
    public function buyMoney()
    {        	
        return $this->apiReturn($this->logicMoney->buyMoney($this->param));
    }
	/**
     * 成交列表
     */
    public function finishList()
    {        	
        return $this->apiReturn($this->logicMoney->finishList($this->param));
    }
	/**
     * 兑换规则
     */
    public function dhConfig()
    {        	
        return $this->apiReturn($this->logicMoney->dhConfig($this->param));
    }
	/**
     * 兑换次数
     */
    public function exchangeNum()
    {        	
        return $this->apiReturn($this->logicMoney->exchangeNum($this->param));
    }
	/**
     * mdc收支明细
     */
    public function moneyLogList()
    {        	
        return $this->apiReturn($this->logicMoney->moneyLogList($this->param));
    }
    /**
     * 购买套餐
     */
    public function buySeries()
    {
        return $this->apiReturn($this->logicMoney->buySeries($this->param));
    }
    /**
     * 套餐列表
     */
    public function serieList()
    {
        return $this->apiReturn($this->logicMoney->serieList($this->param));
    }
    /**
     * 有效套餐
     */
    public function mySeries()
    {
        return $this->apiReturn($this->logicMoney->mySeries($this->param));
    }
    /**
     * 过期套餐
     */
    public function overSeries()
    {
        return $this->apiReturn($this->logicMoney->overSeries($this->param));
    }
}
